package com.hhp.cloud.shop.auth.feign.fallback;

import com.hhp.cloud.shop.auth.feign.UserFeignService;
import com.hhp.cloud.shop.auth.vo.UserAuthVo;
import com.hhp.cloud.shop.common.core.enums.BizCodeEnume;
import com.hhp.cloud.shop.common.core.result.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @Description: 用户远程回调失败
 * @author: hhp
 * @date: 2021/12/2 10:39
 */
@Slf4j
@Component
public class UserFeignServiceFallback implements UserFeignService {
    @Override
    public R<UserAuthVo> getUserByUsername(String username) {
        log.info("熔断方法调用.... 方法:shop-admin/api/v1/admin/user/username/{username}");
        return R.error(BizCodeEnume.TOO_MANY_REQUEST);
    }
}
